import pygame
from pygame.locals import *

class Sprite:
	def __init__(self):
		pass
		
		
class SpriteSheet:
	def __init__(self, filename, size):
		self.image = pygame.image.load(filename)
		self.width = self.image.get_width()
		self.height = self.image.get_height()
		self.tile_width = size[0]
		self.tile_height = size[1]
		self.shape = (self.width/self.tile_width, self.height/self.tile_height)
		self.slices = []
		for y in range(self.shape[1]):
			row = []
			for x in range(self.shape[0]):
				temp = pygame.Surface((self.tile_width, self.tile_height))
				temp.blit(self.image, (0,0,0,0), 
						 (x*self.tile_width, y*self.tile_height, self.tile_width, self.tile_height))
				row.append(temp)
			self.slices.append(row)
		